@file:Suppress("unused")

package com.yl.common

/**
 * 内部使用的异常代码.包括异常名称
 */
enum class ErrorCode(val code: Int, val hint: String) {
	SUCCESS(0, "成功"),

	USER_NOT_SAME_COMPANY(101, "上下级必须在同一个企业内."),
	USER_NOT_FOUND(102, "未找到指定的用户对象."),
	INCORRECT_REQUEST_MODE(103,"请求方式不支持"),
	PARAMETER_FORMAT_ERROR(104,"参数格式错误"),
	FLAG_IS_NOT_ERROR(150,"错误的状态"),

	PARAM_EMPTY(301,"传入数据为空"),
	DATA_CAN_NOT_DELETE(302,"不能删除的数据"),
	DATA_DELETE_FAILED(303,"数据删除失败"),
	DATA_SAVE_FAILED(304,"数据保存失败"),
	LOGIN_ERROR(305,"登录失败"),
	OPERATION_DATA_ERROR(306,"操作失败"),
	NO_LOGIN_USER(307,"游客没有权限访问接口"),
	LOGIN_TIME_OUT(309,"登录状态超时"),
	TOKEN_ERROR(310,"错误的token"),
	FAIL_TO_UPLOAD_IMAGE(311,"图片上传失败"),
	FILENAME_EMPTY(312,"文件名位空"),
	QUERY_PARAM_ERROR(313,"查询参数错误"),
	NO_PERM(314,"没有权限访问接口"),


	COUPONS_USE_ERROR(350,"优惠卷使用错误"),
	COUPONS_TO_CUSTOMER_ERROR(350,"优惠卷发放错误"),

	LOGIN_STATUS_ERROR(401,"登录状态失效"),
	DATA_IS_NOT_FIND(404,"数据未找到，请刷新处理"),



	SERVER_ERROR(500,"服务器异常，请联系管理员"),
	 NO_HANDLER_FOUND(504,"访问路径错误"),

	/**
	 * 7开头，推送信息发送的错误
	 */

	NOT_HAVE_MESSAGE_CONFIG(701,"未配置推送信息"),

	NOT_HAVE_PHONE(702,"没有设置电话"),
	SEND_MESSAGE_ERROR(799,"推送信息失败"),


	/**
	 * 先放这里，到时候加其他类型代码好加
	 */
	UNKNOWN(999, "未知错误"),
	;
}
